<!DOCTYPE html>
<html lang="en" ng-app="pf">
<head>
  	<meta charset="UTF-8">
  	<meta name="renderer" content="webkit|ie-comp|ie-stand">
  	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  	<meta name="description" content="">
  	<meta name="viewport" content="width=device-width">
  	<meta http-equiv="Content-Type" content="textml; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=8">
	<meta http-equiv="Expires" content="0">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Cache-control" content="no-cache">
	<meta http-equiv="Cache" content="no-cache">
	<title>我的收藏夹</title>
 	<link rel="stylesheet" href="collections/css/collections.css">
 	<script src="collections/js/jquery-1.11.3.min.js"></script>
	<script src="collections/js/jquery-ui.min.js"></script>
	<script src="collections/js/jquery.cookie.js"></script>
	<script src="collections/js/angular.js"></script>
	<script src="collections/js/collections.js"></script>
	<script src="collections/js/configs.js"></script>
	<script src="collections/js/data.service.js"></script>
</head>
<body ng-controller="mainCtrl as mc">
	<div class="main">
		<div class="top">
			<div class="logo">
				<a href="/"><img src="/assets/images/logo.png"></a>
			</div>
			<div class="userInfo">
				<span class="username" ng-bind="userNickname"></span>
				|
				<span class="logout" ng-click="mc.logout()">退出</span>
			</div>
		</div>
		<div class="sideNav">
			<div class="sideNav-inner">
				<all-folders folders="mc.allFolders" parents="mc.parentsFolders"></all-folders>
			</div>
		</div>
		<div class="workArea">
			<div class="workArea-inner">
				<div class="bar">
					<div class="tools">
						<span class="newFolder" ng-click="mc.showNewFolder()"><i class="icon"></i>新建文件夹</span>
						<span class="delete" ng-click="mc.delete()" ng-class="{'not-allowed':mc.currentSelected.length==0}"><i class="icon"></i>删除</span>
						<span class="rename" ng-class="{'not-allowed':mc.currentSelected.length!=1}" ng-click="mc.showRename()">重命名</span>
						<span class="move" ng-click="mc.toShowMoveWin()" ng-class="{'not-allowed':mc.currentSelected.length==0}">移动到</span>
					</div>

					<div class="list-type-change">		
						<span class="list-type" ng-click="mc.showType=1" ng-class="{'current':mc.showType==1}">
							<i class="ico ico-table"></i>
						</span>			
						<span class="list-type" ng-click="mc.showType=2" ng-class="{'current':mc.showType==2}">
							<i class="ico ico-list"></i>
						</span>
					</div>

					<div class="search">
						<form ng-submit="mc.goSearch()">
							<input type="text" ng-model="mc.keywords" />
							<input type="submit" value="" />
						</form>
					</div>
				</div>				
				<div class="title">
					<span class="back" ng-if="mc.parentsFolders.length>1"><a ng-click="mc.goBack()">返回上一级</a>|</span>
					<span ng-repeat="p in mc.parentsFolders">
						<i ng-if="$index>0">&gt;</i>
						<a ng-bind="p.name" ng-click="mc.goThisFolder(p.code,$index)" ng-class="{'no':$index==(mc.parentsFolders.length-1)}"></a>
					</span>
					<span class="tongji">已全部加载，共<a ng-if="mc.list.length" ng-bind="mc.list.length"></a><a ng-if="!mc.list.length">0</a>个</span>
				</div>				
				<div class="jszhenSelect" ng-show="mc.showType==1">
					<label ng-click="mc.selectAll();"><i ng-class="{'on':mc.currentSelected.length==mc.list.length}"></i>全选</label>
				</div>
				<div class="juzhen" ng-show="mc.showType==1">
					<new-folder></new-folder>
					<dl ng-repeat="item in mc.list|orderBy:'-isDirectory'" title="{{item.collectionName}}" ng-class="{'on':mc.currentSelected.indexOf(item.collectionCode)!=-1}" ng-click="mc.goSelected(item)">
						<dt ng-class="{'folder':item.isDirectory==true,'file':item.isDirectory==false}">
							<i ng-click="mc.multiSelect(item.collectionCode,$event);"></i>
						</dt>
						<dd ng-show="!(mc.currentSelected.length==1&&mc.showRenameForm==true&&mc.currentSelected[0]==item.collectionCode)">
							<span ng-bind="item.collectionName"></span>
						</dd>
						<dd class="rename" ng-if="mc.currentSelected.length==1&&mc.showRenameForm==true&&mc.currentSelected[0]==item.collectionCode" ng-click="mc.prevent($event)">
							<form ng-submit="mc.goRename()"><input type="text" ng-model="mc.renameText" maxlength="50" /><i class="go" ng-click="mc.goRename()"></i> <i class="cancel" ng-click="mc.hideRename($event)"></i></form>
						</dd>
					</dl>
					<div class="clear"></div>
				</div>

				<div class="lists-header" ng-show="mc.showType==2">
					<table cellpadding="0" cellspacing="0">
							<tr>
								<th><i class="ico" ng-click="mc.selectAll();" ng-class="{'on':mc.currentSelected.length==mc.list.length}"></i>文件名</th>
								<th style="border-left: 1px solid #ccc;">修改日期</th>
							</tr>
					</table>
				</div>

				<div class="lists" ng-show="mc.showType==2">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td><new-folder2></new-folder2></td>
							<td></td>
						</tr>
						<tr ng-repeat="i in mc.list|orderBy:'-isDirectory'" ng-class="{'on':mc.currentSelected.indexOf(i.collectionCode)!=-1}" ng-click="mc.singleSelect(i.collectionCode)" ng-dblClick="mc.goSelected(i)">
							<td>
								<div title="{{i.collectionName}}" ng-show="!(mc.currentSelected.length==1&&mc.showRenameForm==true&&mc.currentSelected[0]==i.collectionCode)">
									<i class="ico" ng-click="mc.multiSelect(i.collectionCode,$event);"></i>
									<span ng-class="{'folder':i.isDirectory==true,'file':i.isDirectory==false}"></span>
									<span ng-bind="i.collectionName" ng-click="mc.goSelected(i)"></span>
								</div>
								<div class="rename" ng-if="mc.currentSelected.length==1&&mc.showRenameForm==true&&mc.currentSelected[0]==i.collectionCode" ng-click="mc.prevent($event)">
									<i class="ico" ng-click="mc.multiSelect(i.collectionCode,$event);"></i>
									<span ng-class="{'folder':i.isDirectory==true,'file':i.isDirectory==false}"></span>
									<form ng-submit="mc.goRename()"><input type="text" ng-model="mc.renameText" maxlength="50" /><i class="go" ng-click="mc.goRename()"></i> <i class="cancel" ng-click="mc.hideRename($event)"></i></form>
								</div>
							</td>
							<td><div><span ng-bind="i.lastModify"></span></div></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>

	<div class="window" ng-show="mc.showMoveWin">
		<div class="header">
			<span class="title"><i class="ico"></i>请选择文件夹</span>
			<span class="ico ico-close" ng-click="mc.toHidMoveWin()"></span>
		</div>
		<div class="body">
			<div class="list-item">
				<div class="labels">位置</div>
				<div class="inputs" ng-click="mc.prevent($event)">
					<i class="ico"></i>
					<input type="text" ng-model="mc.moveTaget.name" readonly="readonly">
					<span class="dropDown" ng-click="mc.showSelect=!mc.showSelect"><i></i></span>
					<folder-list class="folder-list" list="mc.allFolders" show="mc.showSelect"></folder-list>
				</div>
				<div class="clear"></div>
			</div>

			<div class="buttons">
				<span class="btn apply" ng-click="mc.goMove()">移动</span>
				<span class="btn cancel" ng-click="mc.toHidMoveWin()">取消</span>
				<div class="clear"></div>
			</div>
		</div>
	</div>
</body>
</html>